<template>
  <div class="play-bo">
    <div class="ban">
      <img src="../assets/dvn.png" alt="" />
    </div>
    <div class="bpic">
      <div class="center" v-if="currentPlaySong">
        <div
          v-if="currentPlaySong.picUrl"
          class="mask"
          :style="{
            backgroundImage:
              'url(' +
              currentPlaySong.picUrl +
              '?imageView=1&type=webp&thumbnail=246x0)'
          }"
        ></div>
        <div
          class="mask"
          v-else
          :style="{
            backgroundImage:
              'url(' +
              currentPlaySong.al.picUrl +
              '?imageView=1&type=webp&thumbnail=246x0)'
          }"
        ></div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    currentPlaySong: Object,
    playing: Boolean,
    IsBool: Boolean,
  },
};
</script>

<style lang="less" scoped>
@keyframes myrotate {
  from {
    transform: rotate(0);
  }
  to {
    transform: rotate(360deg);
  }
}
.play-bo {
  width: 100%;
  height: 100%;
  // flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  .ban {
    position: absolute;
    top: 0;
    left: 48%;
      transform-origin: 20px 40px;
      transition: all 0.6s;
      transform: rotate(-25deg);
      z-index: 1;
    img {
      width: 60%;
    
    }
  }
  .bpic {
    width: 80%;
    height: 80%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: url("../assets/dta.png") no-repeat center;
    background-size: 100%;
    animation: myrotate 8s linear infinite;
    animation-play-state: paused;
    .center {
      width: 140px;
      height: 140px;
      background-color: pink;
      border-radius: 50%;
      .mask {
        width: 100%;
        height: 100%;
        background-size: cover;
        background-position: center;
        border-radius: 50%;
      }
    }
  }
   &.playing {
    .ban {
      transform: rotate(0deg);
      transition: all 0.4s;

    }
    .bpic {
        animation-play-state: running;
    }
  }
}
</style>